package edu.gznu.ics.fast.pulsar.service.userService;


import edu.gznu.ics.fast.pulsar.model.po.user.uiResourcePO;

import java.util.List;
import java.util.Set;

/**
 * <p>User: Zhang Kaitao
 * <p>Date: 14-1-28
 * <p>Version: 1.0
 */
public interface ResourceService {
    uiResourcePO createResource(uiResourcePO resource);
    uiResourcePO setResource(uiResourcePO resource);
    void deleteResource(Long resourceId);
    uiResourcePO findResourceByResourceId(Long resourceId);
    List<uiResourcePO> findAllResource();
    /**
     * 得到资源对应的权限字符串
     * @param resourceIds
     * @return
     */
    Set<String> findPermissions(Set<Long> resourceIds);
    /**
     * 根据用户权限得到菜单
     * @param permissions
     * @return
     */
    List<uiResourcePO> findMenus(Set<String> permissions);
}
